tools/xenstore: avoid unterminated string in xs_directory_part()
authorJuergen Gross <jgross@suse.com>
Tue, 6 Dec 2016 06:41:54 +0000 (07:41 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 6 Dec 2016 11:59:37 +0000 (11:59 +0000)
commite25ddb6dae04823aeef2c07907d3f0377a905cdd
tree05d76d1d8e5c2028f186d6e6ba291684fd204814
parentcb6ae256e844a954170b9d7d2b6fd1e6000bb50e
tools/xenstore: avoid unterminated string in xs_directory_part()

Commit d4016288ab1f ("xenstore: support XS_DIRECTORY_PART in
libxenstore") introduced a theoretical bug: the generation count of
the read node is transferred via strncpy without forcing a NUL byte
at the end. Correct this.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/xs.c